package com.wswy.wzcx.ui.fkdj

import android.os.Bundle
import com.wswy.wzcx.R
import com.wswy.wzcx.module.base.CBaseFragment
import com.wswy.wzcx.utils.StringUtils
import kotlinx.android.synthetic.main.fragment_fkdj_readonly.*

/**
 * 识别成功 罚单信息
 */
@Deprecated("")
class FineInfoFragment : CBaseFragment() {

    override fun getContentLayoutId(): Int {
        return R.layout.fragment_fkdj_readonly
    }


    override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)

        provideViewModelFromActivity(FineViewModel::class.java).getFineLiveData().value?.run {
            show(this)
        }

    }

    private fun show(data:FineData){
        tv_fine_no.text = data.fineNo
        tv_fine_time.text = data.fineDate
        tv_car_no.text = data.carNo
        tv_fine_name.text = data.fineName
        tv_fine_amount.text = getString(R.string.amount_args,StringUtils.formatMoney(data.fineFee.toDouble()))
        tv_fine_late_amount.text = getString(R.string.amount_args,StringUtils.formatMoney(data.lateFee.toDouble()))
    }

}